<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		<script type="text/javascript" src="../../js/boot.js"></script>
		<title></title>
	</head>

	<body>
		<div class="mini-fit">
			<ul id="pageTree" class="mini-tree" style="width: 100%;" showTreeIcon="true" allowDrag="true" allowDrop="true" textField="departName" idField="departID" resultAsTree="false">
			</ul>
		</div>
		<div class="mini-toolbar" style="text-align:center;padding-top:8px;padding-bottom:8px;" borderStyle="border:0;">
			<a class="mini-button" style="width:60px;" onclick="onOk()">确定</a>
			<span style="display:inline-block;width:25px;"></span>
			<a class="mini-button" style="width:60px;" onclick="onCancel()">取消</a>
		</div>

	</body>

	<script type="text/javascript">
		miniInit();

		var tree = mini.get("pageTree");
		tree.url = http.getUrl("/sys/depart/list.do");
		tree.load(tree.url);
		tree.on("nodedblclick", function(e) {
			// debugger
			editNode = e.node;
			tree.loadNode(editNode);
		});

		function setData(data) {
		}

		function getData() {
			var node = tree.getSelectedNode();
			return node;
		}

		function CloseWindow(action) {
			if(window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
			else window.close();
		}

		function onOk() {
			CloseWindow("ok");
		}

		function onCancel() {
			CloseWindow("cancel");
		}
	</script>

</html>